#include <cstdio>
#include <algorithm>
#include <cmath>
int num[1005];
int abss[1005];
using namespace std;
int main()
{
	freopen("in.txt","r",stdin);
	int i = 0;
	int n;
	scanf("%d",&n);
	int a;
	while(scanf("%d",&a) != EOF)
	{
		num[i++] = a;
	}
	for(int j = 0; j < i - 1; j++)
	{
		abss[j] = abs(num[j+1] - num[j]);
	}
	sort(abss,abss+i-1);
	int flag = 1;
	for(int j = 0; j < i - 1; j++)
	{
		if(abss[j] != j+1) flag = 0;
	}
	if(flag) printf("Jolly\n");
	else printf("Not jolly\n");
}
